# -*- coding: UTF8 -*-
# Author: Sakurazaki
# (Aitor Martin. @arienai_ne - sakurazaki.setsunita@gmail.com)

import pygame
from pygame.locals import *

GRAY = (178, 190, 171) # Ash grey
GREEN = (34, 139, 34) # Forest Green (web)
BLUE = (42, 82, 190) # Cerulean
PURPLE = (104, 40, 96) # Palatinate Purple
YELLOW = (255, 191, 0) # Amber
ORANGE = (255, 69, 0) # Orange-red
RED =  (150, 0, 24) # Carmine

def loadImage(name, alpha=False):
    "Loads given image"

    try:
        surface = pygame.image.load(name)
    except pygame.error:
        raise SystemExit('Could not load image "%s" %s' %
                         (name, pygame.get_error()))
    if alpha:
        corner = surface.get_at((0, 0))
        surface.set_colorkey(corner, pygame.RLEACCEL)

    return surface.convert_alpha()

def getCircle(color=(0, 0, 0), radius=30, thickness=0):
    "Returns a surface with a circle drawn on it. Used for islands."
    c = pygame.Surface((radius*2, radius*2))
    pygame.draw.circle(c, color, (int(radius), int(radius)), int(radius), int(thickness))

    return c
